﻿using System.Collections.Generic;
using System.Threading.Tasks;

namespace JeanFish.Blog.Storage
{
    public interface IBlogDataProvider
    {
        Task<IEnumerable<Post>> ListPostsAsync(Blog blog,Paging paging);
        Task<Blog> LoadBlogAsync();
        Task<User> LoadBlogOnwerAsync(Blog blog);
        Task<User> GetPostAuthorAsync(Post post);
        Task<SavedResult> SaveBlogAsync(Blog blog);
        Task<SavedResult> CreatePostAsync(Post post);
        Task<SavedResult> UpdatePostAsync(Post post);
        Task<Post> GetPostAsync(Blog blog, string postId);
    }
}
